<#import "/common/taglibs/spring.ftl" as spring/>
<#macro headerMenu menus top=true>
    <ul class="dropdown-menu pull-left">
    <#list menus as menu>
            <#if menu.children?? && (menu.children?size gt 0)>
                <li class="dropdown-submenu" aria-haspopup="true">
                    <a href="javascript:;" id="hor_menu_${(menu.code)!}" >
                        <i class="${(menu.icon)!}"></i> <@showName item=menu/></a>
                <@headerMenu menus=menu.children top=false/>
                </li>
            <#else>
                <li>
                    <a href="<@menuUrl url=(menu.url)!/>" id="hor_menu_${(menu.code)!}" data-menu-code="${(menu.code)!}" data-pjax><i class="${(menu.icon)!}"></i> <@showName item=menu/></a>
                </li>
            </#if>
    </#list>
    </ul>
</#macro>